Partial Class CallbackWithElements
	Inherits System.Web.UI.Page : Implements DotNetNuke.UI.Utilities.IClientAPICallbackEventHandler

#Region " Web Form Designer Generated Code "

	'This call is required by the Web Form Designer.
	<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub
    Protected WithEvents div1 As System.Web.UI.HtmlControls.HtmlGenericControl

	'NOTE: The following placeholder declaration is required by the Web Form Designer.
	'Do not delete or move it.
	Private designerPlaceholderDeclaration As System.Object

	Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
		'CODEGEN: This method call is required by the Web Form Designer
		'Do not modify it using the code editor.
		InitializeComponent()

	End Sub

#End Region

	Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
		DotNetNuke.UI.Utilities.ClientAPI.HandleClientAPICallbackEvent(Me)
	End Sub

	Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
		'Put user code to initialize the page here
        Me.Button1.Attributes.Add("onclick", DotNetNuke.UI.Utilities.ClientAPI.GetCallbackEventReference(Me, "'constant'", "successFunc", "this", "errorFunc", Me.Form))
		'Me.Button1.Attributes.Add("onclick", DotNetNuke.UI.Utilities.ClientAPI.GetCallbackEventReference(Me, "'constant'", "successFunc", "this", "errorFunc", Nothing, DotNetNuke.UI.Utilities.ClientAPI.DNNVARIABLE_CONTROLID))
	End Sub

    Public Function RaiseClientAPICallbackEvent(ByVal eventArgument As String) As String Implements DotNetNuke.UI.Utilities.IClientAPICallbackEventHandler.RaiseClientAPICallbackEvent
        Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder
        sb.Append(Now.ToString & vbCrLf)
        sb.Append(Me.txt.UniqueID & ": " & Request(Me.txt.UniqueID) & vbCrLf)
        sb.Append(Me.cbo.UniqueID & ": " & Request(Me.cbo.UniqueID) & vbCrLf)
        sb.Append(Me.ta.UniqueID & ": " & Request(Me.ta.UniqueID) & vbCrLf)
        sb.Append(Me.chk.UniqueID & ": " & Request(Me.chk.UniqueID) & vbCrLf)
        sb.Append("myvar: " & DotNetNuke.UI.Utilities.ClientAPI.GetClientVariable(Me.Page, "myvar") & vbCrLf)

        'For Each sKey As String In Request.Form.AllKeys
        '	sb.Append(sKey & ":" & Request.Form(sKey) & vbCrLf)
        'Next

        Return sb.ToString
    End Function

	Private Sub chk_ServerChange(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chk.ServerChange

	End Sub
End Class
